<?php
     require_once('MysqlConnect.php');

     $pid=$_POST['id'];
     $sql="select * from articlelist where id=$pid";

     if(!$sel=mysql_query($sql)) echo "定位失败";
     $data=mysql_fetch_assoc($sel);     //将定为到的数据从数据库中取出返回给页面



?>




<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
     <link rel="stylesheet" href="articleCss.css">
</head>
<body>
	<div id="header" style="background-image:url('BG1.png');width:900px;"> <h1 style="text-align:center;">文章发布管理系统</h1></div>
	<div id="menu" style="background-image:url('BG2.jpg');float:left;width:100px;" >
			<p style="text-align:center;"><a href="Article_add_display.php">发布文章</a></p>
			<p style="text-align:center;"><a href="Article_manage.php">管理文章</a></p>
	</div>

	<div id="content" style="background-image:url('BG3.jpg');height:800px;width:800px;float:left;">
          <h2 style="text-align:center;">修改文章</h2>
          <br>	

          <form method="post" action="Article_change.php">
          	<table width="779" border="0" cellpadding="8" cellspacing="1">
          		
                    <tr>
          			<td width="300" ><p style="text-align:center">标题</p></td>
          			<td width="625" ><label for="title"></label>
          				<input type="text" name="title" id="title" value="<?php echo $data['title'];?>" />
                              <input type="hidden" name="id" id="$data['id']" value="<?php echo $data['id'];?>" />
          			</td>
          		</tr>
          		
          		<tr>
          			<td width="300" ><p style="text-align:center">作者</p></td>
          			<td width="625" ><label for="author"></label>
          				<input type="text" name="author" id="author" value="<?php echo $data['author'];?>" />
          			</td>
          		</tr>

          		<tr>
          			<td width="300" ><p style="text-align:center">描述</p></td>
          			<td width="625" ><label for="description"></label>
          				<textarea name="description" id="description" cols="30" rows="5"><?php echo $data['description'];?></textarea>
          			</td>
          		</tr>

           		<tr>
          			<td width="300" ><p style="text-align:center">文章内容</p></td>
          			<td width="625" ><label for="content"></label>
          				<textarea name="content" id="content" cols="60" rows="20" ><?php echo $data['content'];?></textarea>
          			</td>
          		</tr>

          		<tr>
          			<td colspan='100' align="right"> 
						<input type="submit" name="button" id="button" value="修改文章">
          			</td>
          		</tr>         		

          	</table>
          </form>

    </div>

</body>
</html>